//
//  TestProblem268.swift
//  LeetCodeTests
//
//  Created by 武侠 on 2023/6/16.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//

import XCTest
@testable import LeetCode

class TestProblem268: XCTestCase {
    
    var problem = Problem268()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem268_Case1() throws {
        assert(problem.missingNumber([3, 0, 1]) == 2)
    }
    
    func testProblem268_Case2() throws {
        assert(problem.missingNumber([0, 1]) == 2)
    }
    
    func testProblem268_Case3() throws {
        assert(problem.missingNumber([9,6,4,2,3,5,7,0,1]) == 8)
    }
    
    func testProblem268_Case4() throws {
        assert(problem.missingNumber([0]) == 1)
    }
    
    
    func testProblem268_1_Case1() throws {
        assert(problem.missingNumber1([3, 0, 1]) == 2)
    }
    
    func testProblem268_1_Case2() throws {
        assert(problem.missingNumber1([0, 1]) == 2)
    }
    
    func testProblem268_1_Case3() throws {
        assert(problem.missingNumber1([9,6,4,2,3,5,7,0,1]) == 8)
    }
    
    func testProblem268_1_Case4() throws {
        assert(problem.missingNumber1([0]) == 1)
    }
}
